Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unicode-properties

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unicode-properties

Provides fast access to unicode character properties

  • 1.4.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is unicode-properties?

The unicode-properties npm package provides utilities for querying properties of Unicode characters. It allows developers to determine various attributes of Unicode characters, such as their general category, script, and whether they are whitespace, punctuation, etc.

What are unicode-properties's main functionalities?

Get General Category

This feature allows you to get the general category of a Unicode character. In the example, the character 'A' is queried, and the output is 'Lu', which stands for 'Letter, Uppercase'.

const unicode = require('unicode-properties');
const category = unicode.getCategory('A');
console.log(category); // Output: 'Lu'

Check if Character is Alphabetic

This feature checks if a given Unicode character is alphabetic. In the example, the character 'A' is checked, and the output is true.

const unicode = require('unicode-properties');
const isAlphabetic = unicode.isAlphabetic('A');
console.log(isAlphabetic); // Output: true

Get Script of Character

This feature allows you to get the script of a Unicode character. In the example, the character 'あ' is queried, and the output is 'Hiragana'.

const unicode = require('unicode-properties');
const script = unicode.getScript('あ');
console.log(script); // Output: 'Hiragana'

Check if Character is Whitespace

This feature checks if a given Unicode character is a whitespace character. In the example, the space character is checked, and the output is true.

const unicode = require('unicode-properties');
const isWhitespace = unicode.isWhitespace(' ');
console.log(isWhitespace); // Output: true

Other packages similar to unicode-properties

Keywords

FAQs

Package last updated on 19 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc